//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop

#include "Globals.h"

#pragma package(smart_init)
#pragma resource "*.dfm"
TRealMenu *RealMenu;
//---------------------------------------------------------------------------
__fastcall TRealMenu::TRealMenu(TComponent* Owner)
    : TForm(Owner)
{
}

////////////////////////////
//                        //
////////////////////////////
void __fastcall TRealMenu::FormPaint(TObject *Sender)
{
  WORD xPos,
       yPos,
       *ptr;

  TEMP->Width  = 320;
  TEMP->Height = 240;
      
  ////////////////////////////
  // Draw the small map
  for ( int i = 0; i < TEMP->Height; i++ )
     memsetw((WORD *)TEMP->ScanLine[i], 0x738E, 320);
  //
  xPos = map.Xpos << 3;
  yPos = map.Ypos << 3;
  //
  for ( int y = 0; y < TEMP->Height - yPos; y++)
  {
    (void *)ptr = (WORD *)TEMP->ScanLine[ y + yPos ];
    memcpyw(&ptr[ xPos ], &ScrBuf[y * 320], 320 - xPos, 0 );
  }
  RealMenu->Canvas->StretchDraw( RealMenu->ClientRect, TEMP );
}



